package com.zrrd.learn.chapter01.Game;

/**
 * 乔峰
 *
 * @author asus
 * @version 1.0
 * @date 2023/8/15 17:19
 */
public class Feng {

    private int blood;
    private int attack;
    private int defense;


    public void setBlood(int blood){
       this.blood=blood;

   }

    public int getBlood(){
        return blood;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }

    public int getAttack() {
        return attack;
    }

    public void setDefense(int defense) {
        this.defense = defense;
    }

    public int getDefense() {
        return defense;
    }




        /**
         * 攻击
         */
        int num = 0;
    public int attacked(int blood,int attack,int defense){
        //返回剩余血量
        if(num==1){
            return blood+defense;
        }else if(num==8){
            return  attack+6;
        }
            return blood-attack;
        }






}
